﻿using System;
using System.Runtime.CompilerServices;
using Microsoft.Scripting.Runtime;

namespace Cjc.Calculation.ExpressionEngine.Excel.Runtime.Operations
{
	public static class BigIntOps
	{
		[ImplicitConversionMethod]
		public static decimal ConvertToDecimal( long x ) { return (decimal)x; }
		[ImplicitConversionMethod]
		public static double ConvertToDouble( long x ) { return (double)x; }
		[ImplicitConversionMethod]
		public static string ConvertToString( long x ) { return x.ToString(); }

		[SpecialName]
		public static object Add( long x, long y ) { return x + y; }
		[SpecialName]
		public static object Subtract( long x, long y ) { return x - y; }
		[SpecialName]
		public static object Multiply( long x, long y ) { return DecimalOps.Multiply( x, y ); }
		[SpecialName]
		public static object Divide( long x, long y ) { return DecimalOps.Divide( x, y ); }
	}
}